package cn.lizhangqu.kb.api;

import com.loopj.android.http.AsyncHttpResponseHandler;
import com.loopj.android.http.RequestParams;
/**
 * Created by 柯尊诚 on 2015/11/5.
 * kzc
 */
public class LgrgApi {

    public final static String HOST = "www.lgrg-xm.com";
    public final static String HTTP = "http://";
    public final static String DETAIL = "/articleDetail/";//正文
    public final static String BASE_URL = HTTP + HOST;
    public final static int PAGE_SIZE = 10;

    public static void getJwNoticeList(String url, AsyncHttpResponseHandler handler) {
        AsyncHttpHelp.get(BASE_URL + url, handler);
    }

    public static void getSchoolMore(int page, String name, AsyncHttpResponseHandler handler) {
        RequestParams params  = new RequestParams();
        params.put("showSeat", name);
        params.put("paging.currentPage", page);
        params.put("paging.pageSize", PAGE_SIZE);
        AsyncHttpHelp.post(BASE_URL + "/more", params, handler);
    }

    public static void getStudentWorker(int page, String code, AsyncHttpResponseHandler handler) {
        RequestParams params = new RequestParams();
        params.put("columnId", code);
        params.put("paging.currentPage", page);
        params.put("paging.pageSize", PAGE_SIZE);
        AsyncHttpHelp.post(BASE_URL + "/selectXgdt", params, handler);
    }

    public static void getSchoolColumn(int page, String code, AsyncHttpResponseHandler handler) {
        RequestParams params = new RequestParams();
        params.put("columnId", code);
        params.put("paging.currentPage", page);
        params.put("paging.pageSize", PAGE_SIZE);
        AsyncHttpHelp.post(BASE_URL + "/selectColumn", params, handler);
    }


}
